	var byId = function(id) {
		return document.getElementById(id);
	};
	function initBarChart(data1,data2, chartId,chartType) {
			var getOption = function(chartType) {
				var chartOption = {
//					legend: {
//						data: ['得分']
//					},
					grid: {
						x: 35,
						x2: 20,
						y: 30,
						y2: 20
					},
					toolbox: {
						show: false,
						feature: {
							mark: {
								show: true
							},
							dataView: {
								show: true,
								readOnly: false
							},
							magicType: {
								show: true,
								type: ['line']
							},
							restore: {
								show: true
							},
							saveAsImage: {
								show: true
							}
						}
					},
					calculable: false,
					xAxis: [{
						type: 'category',
						data: data1
					}],
					yAxis: [{
						type: 'value',
						splitArea: {
							show: true
						}
					}],
					series: [{
						name: '得分',
						type: chartType,
						data: data2
					}]
				};
				return chartOption;
			};
				
			var barChart = echarts.init(byId(chartId));
			barChart.setOption(getOption(chartType));
	}

	function initRadarChart(chartData1, chartData2, chartId,chartType) {
			var chartOption = {
				title: {
					text: ''
				},
				tooltip: {},
				legend: {
					data: ['', '']
				},
				radar: {
					// shape: 'circle',
					indicator: chartData1
				},
				series: [{
					name: '',
					type: 'radar',
					// areaStyle: {normal: {}},
					data: [{
						value: chartData2,
						name: ''
					}]
				}]
	
			};
		var barChart = echarts.init(byId(chartId));
		barChart.setOption(chartOption);
	}
	function initScoreChart(scored,less, chartId) {
		var chartOption = {
			series: [{
				name: '本次得分',
				type: 'pie',
				radius: ['50%', '60%'],
				avoidLabelOverlap: false,
				label: {
					normal: {
						show: true,
						position: 'center',
						textStyle: {
							fontSize: '14',
							fontWeight: 'bold'
						}
					},
					emphasis: {
						show: false,
						textStyle: {
							fontSize: '30',
							fontWeight: 'bold'
						}
					}
				},
				labelLine: {
					normal: {
						show: false
					}
				},
				data: [{
					value: scored,
					name: scored ,//+ '分'
					itemStyle:{normal:{color:"#00a8c6"}}
					
				}, {
					value: less,
					name: '',
					itemStyle:{normal:{color:"#ECFFFF"}}
				}, ]
			}]
		};
		var barChart = echarts.init(byId(chartId));
		barChart.setOption(chartOption);
	}
	